<%-- 
    Document   : formularioRegistrar
    Created on : 03/11/2011, 06:45:22 PM
    Author     : ari
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <script type="text/javascript">
    

    function validate_form ( )
    {
       valid = true;
       
       if (document.formuser.name.value == "" || document.formuser.pass.value == "" || document.formuser.rep.valuef == "")
       {
           alert ("Los campos obligatorios no pueden ser vacíos!");
           valid = false;
       }
       if (document.formuser.pass.value != document.formuser.rep.value){
               
               alert ("Las contraseñas deben coincidir!");
               valid = false;
       }
       
       return valid;
    }

    </script>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="estilo.css">
        <title>Bolsa de Valores</title>
    </head>
    <body>
        <div class="caja">
            <h3>Registro</h3><br>
            <%session.removeAttribute("mensaje");%>
        <form name="formuser" method=post action="registrar.jsp" onsubmit="return validate_form( )";>
            Usuario: <input type=text name=name><br>
            Clave: <input type=password name=pass><br>
            Repita: <input type=password name=rep><br>
            <div>
            <input type=submit value="Aceptar">
            <input type=button value="Cancelar" onclick="location.href='index.jsp'">
            </div>
        </form>
        </div>
    </body>
</html>
